Base64 Encoder / Decoder

Convert text to Base64 and back, with full UTF-8 support

0 bytes
Data expansion 0% ratio
Input size Output size
0 bytes

What this tool does

A converter that encodes text to Base64 or decodes a Base64 string back to text. Results appear as you type, along with the byte counts of input and output and a bar showing the size change as a percentage. Multi-byte characters such as Korean or emoji are handled as UTF-8. Use it to check API auth headers, data URIs or encoded values in config files.

How it is calculated

Encoding converts text to UTF-8 bytes, splits them into 3-byte (24-bit) groups, breaks each into four 6-bit pieces and writes each piece as one of 64 characters (A–Z, a–z, 0–9, + and /). If bytes run short at the end, = fills the gap. Decoding reverses this to get bytes and reads them back as UTF-8 text. For example, 'hello' (5 bytes) becomes aGVsbG8=, and a two-character Korean greeting that takes 6 bytes in UTF-8 becomes 8 characters. So the output is about 4/3 the size, roughly 33% longer, and that ratio appears in the bar and percentage. Decoding something that is not valid Base64 or cannot be read as UTF-8 text shows an error message in the result box. The tool's code has nothing that sends input out; every conversion happens in the browser.

Things to know

Frequently asked questions

Can I hide a password with Base64?

No. It is encoding, not encryption, and anyone can reverse it with a tool like this. Encrypt passwords and keys or keep them on the server.

Why is the output longer than the input?

Each 8-bit byte is split into 6-bit pieces written as characters. Three bytes become four characters, about 4/3 or 33% larger, a little more when padding is added.

Decoding shows an error.

The string contains disallowed characters (URL-safe - and _, full-width characters and so on), the end was cut off, or the original was not UTF-8 text. Binary data such as images, or strings made from another character encoding, cannot be restored as text here.

Can I turn an image file into Base64?

This tool only handles text typed or pasted into the box. Making an image data URI needs a separate tool that reads and encodes the file.

📚 Worth reading
🧬What Is Base64: Why It Grows About 33% and Isn't Encryption→ 🔑How people actually lose crypto from wallets→ 🔐A realistic way to manage passwords→ 🥇Gold purity: what 24K, 18K and 14K mean, and 999, 750, 585 marks→